home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 117 / PC Guia 117.iso / Software / Utils / Software4 / Product5 / Setup.exe / Lotus Notes / DlpNotes.ntf (.txt) next >
Encoding:
Lotus Notes Storage Facility  |  2005-01-25  |  1.5 MB  |  1,834 lines

  1. DlpNotes
  2. #1DlpNotes
  3. DESlockConfiguration
  4. O=deskey
  5. O=deskey
  6. PURSAFO
  7. O=deskey
  8. CN=Mark Anstice/O=deskey
  9. r<5*EN
  10. PURSAFO
  11. qO%S 
  12. $TITLE
  13. $Formula
  14. FOLDER_DIRECTORY_OBJECT
  15. CN=Administrator/O=deskeyCN=Administrator/O=deskey
  16. CN=deskey-server/O=deskey
  17. CN=Mark Anstice/O=deskey
  18. $profile_020deslockconfiguration_
  19. $PrivateDesign
  20. CN=Mark Anstice/O=deskey
  21. ###################################################
  22. ##########################################################
  23. ##########################################################
  24. $profile_020deslockconfiguration_
  25. CN=Mark Anstice/O=deskey###############################
  26. CN=Mark Anstice/O=deskey
  27. ffffffffffffff
  28. ffffg
  29. DlpNotes
  30. #1DlpNotest################
  31. CN=Mark Anstice/O=deskey
  32. ########################################
  33. CN=Mark Anstice/O=deskeyDlpEncryptions34Q1########
  34. ##########################################################
  35. ##########################################################
  36. ##########################################################
  37. ##########################################################
  38. ##########################################################
  39. ##########################################################
  40. ##########################################################
  41. ##########################################################
  42. ##########################################################
  43. ##########################################################
  44. ##########################################################
  45. ##########################################################
  46. ##########################################################
  47. CN=Mark Anstice/O=deskeyDESlock+ Configuration...303
  48. ######################
  49. (DESlock+ Configuration)DESlockConfiguration
  50. CN=Mark Anstice/O=deskey
  51. SetShowFormattedWarningSetForceViewerSetAutoDecryptBodiesSetRecipientForceViewerSetObscureSubjectSetAutoEncryptAttachments############
  52. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$AssistFlags2$UpdatedBy$$FormScript_O$LANGUAGE$Writers$PWriters$FlagsExt$FileSize$MimeType$DesignerVersion
  53. $Modified
  54.     1S2S3S
  55. $Flags
  56.     0SL1S4S5S3724
  57. $TITLE
  58. CN=Administrator/O=deskey
  59. ####################
  60.     DESlock+
  61. CN=Mark Anstice/O=deskeyCUA3DlpEncrypted##################
  62. ##########################################################
  63. ##########################################################
  64. ##########################################################
  65. ##########################################################
  66. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$AssistFlags2$UpdatedBy$$FormScript_O$LANGUAGE$Writers$PWriters$FlagsExt$FileSize$MimeType$DesignerVersion$Private
  67. $Modified
  68.     1S2S3S
  69. $Flags
  70.     0SL1S4S5S$PrivateDesignn4096
  71. $TITLE
  72. CN=deskey-server/O=deskey
  73. ###########################################
  74. ##########################################################
  75. ##########################################################
  76. ##########################################################
  77. ##########################################################
  78. ##########################################################
  79. ##########################################################
  80. ##########################################################
  81. ##########################################################
  82. ##########################################################
  83. ##########################################################
  84. ##########################################################
  85. ##########################################################
  86. ##########################################################
  87. ##########################################################
  88. ##########################################################
  89. ##########################################################
  90. ##########################################################
  91. ##########################################################
  92. ##########################################################
  93. ##########################################################
  94. ##########################################################
  95. ##########################################################
  96. ##########################################################
  97. ##########################################################
  98. ##########################################################
  99. ##########################################################
  100. ##########################################################
  101. ##########################################################
  102. ##########################################################
  103. ##########################################################
  104. ##########################################################
  105. ##########################################################
  106. ##########################################################
  107. ##########################################################
  108. ##########################################################
  109. ##########################################################
  110. ##########################################################
  111. ##########################################################
  112. ##########################################################
  113. ##########################################################
  114. ##########################################################
  115. ##########################################################
  116. ##########################################################
  117. ##########################################################
  118. ##########################################################
  119. ##########################################################
  120. ##########################################################
  121. ##########################################################
  122. ##########################################################
  123. ##########################################################
  124. ##########################################################
  125. ##########################################################
  126. ##########################################################
  127. ##########################################################
  128. ##########################################################
  129. ##########################################################
  130. ##########################################################
  131. ##########################################################
  132. ##########################################################
  133. ##########################################################
  134. ##########################################################
  135. ##########################################################
  136. ##########################################################
  137. ##########################################################
  138. ##########################################################
  139. ##########################################################
  140. ##########################################################
  141. ##########################################################
  142. ##########################################################
  143. ##########################################################
  144. ##########################################################
  145. ##########################################################
  146. ##########################################################
  147. ##########################################################
  148. ##########################################################
  149. ##########################################################
  150. ##########################################################
  151. ##########################################################
  152. ##########################################################
  153. ##########################################################
  154. ##########################################################
  155. ##########################################################
  156. ##########################################################
  157. ##########################################################
  158. ##########################################################
  159. ##########################################################
  160. ##########################################################
  161. ##########################################################
  162. ##########################################################
  163. ##########################################################
  164. ##########################################################
  165. ##########################################################
  166. ##########################################################
  167. ##########################################################
  168. ##########################################################
  169. ##########################################################
  170. ##########################################################
  171. ##########################################################
  172. ##########################################################
  173. ##########################################################
  174. ##########################################################
  175. ##########################################################
  176. ##########################################################
  177. ##########################################################
  178. ##########################################################
  179. ##########################################################
  180. ##########################################################
  181. ##########################################################
  182. ##########################################################
  183. ##########################################################
  184. ##########################################################
  185. ##########################################################
  186. ##########################################################
  187. ##########################################################
  188. ##########################################################
  189. ##########################################################
  190. ##########################################################
  191. ##########################################################
  192. ##########################################################
  193. ##########################################################
  194. ##########################################################
  195. ##########################################################
  196. ##########################################################
  197. ##########################################################
  198. ##########################################################
  199. ##########################################################
  200. ##########################################################
  201. ##########################################################
  202. ##########################################################
  203. ##########################################################
  204. ##########################################################
  205. ##########################################################
  206. ##########################################################
  207. ##########################################################
  208. ##########################################################
  209. ##########################################################
  210. ##########################################################
  211. ##########################################################
  212. ##########################################################
  213. ##########################################################
  214. ##########################################################
  215. ##########################################################
  216. ##########################################################
  217. ##########################################################
  218. ##########################################################
  219. ##########################################################
  220. ##########################################################
  221. ##########################################################
  222. ##########################################################
  223. ##########################################################
  224. ##########################################################
  225. ##########################################################
  226. ##########################################################
  227. ##########################################################
  228. ##########################################################
  229. ##########################################################
  230. ##########################################################
  231. ##########################################################
  232. ##########################################################
  233. ##########################################################
  234. ##########################################################
  235. ##########################################################
  236. ##########################################################
  237. ##########################################################
  238. ##########################################################
  239. ##########################################################
  240. ##########################################################
  241. ##########################################################
  242. O=deskey
  243. O=deskey
  244. PURSAFO
  245. O=deskey
  246. CN=Mark Anstice/O=deskey
  247. r<5*EN
  248. PURSAFO
  249. $ACLDigest
  250. 19/06/2003 14:07:32 Mark Anstice/deskey updated Administrator/deskey
  251. 19/06/2003 14:07:25 Mark Anstice/deskey added Administrator/deskey
  252. 12/06/2003 10:20:12 Mark Anstice/deskey added OtherDomainServers
  253. 12/06/2003 10:20:12 Mark Anstice/deskey added LocalDomainServers
  254. 12/06/2003 10:20:12 Mark Anstice/deskey updated Mark Anstice/deskey
  255. 12/06/2003 10:20:12 Mark Anstice/deskey added Mark Anstice/deskey
  256. -Default-
  257. CN=Mark Anstice/O=deskey
  258. LocalDomainServers
  259. OtherDomainServers
  260. CN=Administrator/O=deskey
  261. $$$$$C1$
  262. sistType$AssistFlags$AssistFlags2$UpdatedBy
  263. CN=Mark Anstice/O=deskey$$FormScript_O$LANGUAGE$Writers$PWriters$FlagsExt$FileSize$MimeType$DesignerVersionN
  264. $TITLE
  265. DlpEncryption$FormPrivs$FormUsers$Body$Flags
  266. s34Q$Class$Modified
  267. $Comment$AssistTrigger$AssistType$AssistFlags$AssistFlags2$UpdatedBy
  268. CN=Mark Anstice/O=deskey$$FormScript_O$LA
  269. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$AssistFlags2$UpdatedBy$$FormScript_O$LANGUAGE$Writers$PWriters$FlagsExt$FileSize$MimeType$DesignerVersion$Private$C1$
  270. $Modified
  271.     1S2S3S
  272. $Flags
  273.     0SL1S4S5S
  274. $TITLE
  275. Started running agent 'DESlock+ Configuration...' on 12/06/2003 11:05:34
  276. 0 document(s) were modified by formula
  277. Done running agent 'DESlock+ Configuration...' on 12/06/2003 11:05:35
  278. nV$DesignVersion$Version$Formula$FormulaClass$Collation$UpdatedBy$TITLEIconBitmap$ACLDigest$Signature$Collection$ViewContainer$ScriptLib$ScriptLib_O$Flags$PublicAccess$Info$$ScriptName$Body$$Script_O$ACTIONS$SCRIPTOBJ_0$SCRIPTOBJ_1$SCRIPTOBJ_2$SCRIPTOBJ_3$SCRIPTOBJ_4$SCRIPTOBJ_5$SCRIPTOBJ_6$AssistVersion$Type$Operation$Scan$LeftToDo$Name$WindowTitleSetAutoEncryptOnSend$FieldsSetAutoEncryptAttachmentsSetObscureSubjectSetRecipientForceViewerSetAutoDecryptBodiesSetObscureSubject_1SetRecipientForceViewer_1SetForceViewerSetShowFormattedWarning$$FormScript$$$FormScript_ODlpEncrypted$FlagsNoRefresh$ReplFlags$SCRIPTOBJ_7
  279. (DESlock+ Configuration)DESlockConfiguration
  280. (DESlock+ Configuration)DESlockConfiguration>
  281. (DESlock+ Configuration)DESlockConfiguration>
  282. (DESlock+ Configuration)DESlockConfiguration>
  283. CN=Mark Anstice/O=deskey
  284. DlpEncryption
  285. DESlock+
  286. DESlock+ Configuration...
  287. (DESlock+ Configuration)DESlockConfiguration
  288. (DESlock+ Configuration)DESlockConfiguration>
  289. (DESlock+ Configuration)DESlockConfiguration>
  290. (DESlock+ Configuration)DESlockConfiguration>
  291. DESlock+ Configuration
  292.  DESlockConfiguration
  293. ???ppp
  294. ?@>///
  295. OOO???
  296.  @  @@ @` @
  297. @@ @@@@@`@@
  298. `@ `@@`@``@
  299. SetAlwaysSaveB
  300. DESlock+ Configuration
  301. Encryption Settings
  302. SetAutoEncryptAttachments
  303. Auto encrypt attachments|1
  304. SetObscureSubject
  305. Obscure subject when sending|1
  306. SetRecipientForceViewer
  307. Force recipient to use viewer on decrypt|1
  308. Decryption  Settings
  309. SetAutoDecryptBodies
  310. Auto decrypt message bodies on opening|1
  311. SetForceViewer
  312. Always use viewer to show messages|1
  313. Warning Messages
  314. SetShowFormattedWarning
  315. Show warning about formatted messages|1
  316. SetAutoEncryptAttachments
  317. SetAutoEncryptAttachments
  318.     1S2S3S
  319. SetObscureSubject
  320. SetObscureSubject
  321.     0R1S2S3S
  322. SetRecipientForceViewer
  323. SetRecipientForceViewer
  324.     0R1S2S3S
  325. SetAutoDecryptBodies
  326. SetAutoDecryptBodies
  327.     0RR1S2S3S
  328. SetForceViewer
  329. SetForceViewer
  330.     0R1S2S3S
  331. SetAlwaysSaveBody
  332. SetAlwaysSaveBody
  333.     0R1S2S3S
  334. SetShowFormattedWarning
  335. SetShowFormattedWarning
  336.     0RR1S2S3S
  337. SetAutoEncryptAttachments
  338. SetObscureSubject
  339. SetRecipientForceViewer
  340. SetAutoDecryptBodies
  341. SetForceViewer
  342. SetAlwaysSaveBody
  343. SetShowFormattedWarning
  344. Reset to defaults
  345. Categori_zeo
  346. _Edit Document
  347. Send Docu_ment
  348. _Forward
  349. _Move To Folder...
  350. _Remove From Folder_
  351.     0S0E
  352. Close_F
  353. SaveOptions
  354.     1S2S3S
  355. O=deskey
  356. O=deskey
  357. PURSAFO
  358. O=deskey
  359. CN=Mark Anstice/O=deskey
  360. r<5*EN
  361. PURSAFO
  362. DXt"i
  363. $TITLE
  364. $Info
  365. $WindowTitle
  366. $$Script_O
  367. $$ScriptName
  368. $Body
  369. $ACTIONS
  370. CN=Mark Anstice/O=deskey
  371. DlpEncryption
  372. DESlock+
  373. DESlock+ Configuration...
  374. (DESlock+ Configuration)DESlockConfiguration
  375. (DESlock+ Configuration)DESlockConfiguration>
  376. (DESlock+ Configuration)DESlockConfiguration>
  377. (DESlock+ Configuration)DESlockConfiguration>
  378. $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$AssistFlags2$UpdatedBy$$FormScript_O$LANGUAGE$Writers$PWriters$FlagsExt$FileSize$MimeType$DesignerVersion$C1$
  379. $Modified
  380.     1S2S3S
  381. $Flags
  382.     0SL1S4S5S
  383. $TITLE
  384. ESlock+ Configuration...
  385. DESlock+
  386. CN=Mark Anstice/O=deskey
  387. DlpEncryption
  388. DESlock+
  389. DESlock+ Configuration...
  390. deskey-server/deskey
  391. CN=Mark Anstice/O=deskey
  392. CN=Mark Anstice/O=deskey
  393. CN=Mark Anstice/O=deskey
  394. CN=Mark Anstice/O=deskey
  395. CN=Mark Anstice/O=deskey
  396. CN=Mark Anstice/O=deskey
  397. CN=Mark Anstice/O=deskey
  398. CN=Mark Anstice/O=deskey
  399. CN=Mark Anstice/O=deskey
  400. CN=Mark Anstice/O=deskey
  401. CN=Mark Anstice/O=deskey
  402. CN=Mark Anstice/O=deskey
  403. CN=Mark Anstice/O=deskey
  404. CN=Mark Anstice/O=deskey
  405. CN=Mark Anstice/O=deskey
  406. CN=Mark Anstice/O=deskey
  407. CN=Mark Anstice/O=deskey
  408. CN=Mark Anstice/O=deskey
  409. CN=Mark Anstice/O=deskey
  410. CN=Mark Anstice/O=deskey
  411. CN=Mark Anstice/O=deskey
  412. CN=Mark Anstice/O=deskey
  413. CN=Mark Anstice/O=deskey
  414. CN=Mark Anstice/O=deskey
  415. CN=Mark Anstice/O=deskey
  416. CN=Mark Anstice/O=deskey
  417. CN=Mark Anstice/O=deskey
  418. CN=Mark Anstice/O=deskey
  419. CN=Mark Anstice/O=deskey
  420. CN=Mark Anstice/O=deskey
  421. CN=Mark Anstice/O=deskey
  422. CN=Mark Anstice/O=deskey
  423. CN=Mark Anstice/O=deskey
  424. CN=Mark Anstice/O=deskey
  425. CN=Mark Anstice/O=deskey
  426. CN=Mark Anstice/O=deskey
  427. CN=Mark Anstice/O=deskey
  428. CN=Mark Anstice/O=deskey
  429. CN=Mark Anstice/O=deskey
  430. CN=Mark Anstice/O=deskey
  431. CN=Mark Anstice/O=deskey
  432. CN=Mark Anstice/O=deskey
  433. CN=Mark Anstice/O=deskey
  434. CN=Mark Anstice/O=deskey
  435. CN=Mark Anstice/O=deskey
  436. CN=Mark Anstice/O=deskey
  437. CN=Mark Anstice/O=deskey
  438. CN=Mark Anstice/O=deskey
  439. (DESlock+ Configuration)DESlockConfiguration
  440. (DESlock+ Configuration)DESlockConfiguration>
  441. (DESlock+ Configuration)DESlockConfiguration>
  442. (DESlock+ Configuration)DESlockConfiguration>
  443. CN=Mark Anstice/O=deskey
  444. DlpEncryption
  445. DESlock+
  446. DESlock+ Configuration...
  447. (DESlock+ Configuration)DESlockConfiguration
  448. (DESlock+ Configuration)DESlockConfiguration>
  449. (DESlock+ Configuration)DESlockConfiguration>
  450. (DESlock+ Configuration)DESlockConfiguration>
  451. (DESlock+ Configuration)DESlockConfiguration
  452. (DESlock+ Configuration)DESlockConfiguration>
  453. (DESlock+ Configuration)DESlockConfiguration>
  454. (DESlock+ Configuration)DESlockConfiguration>
  455. CN=Mark Anstice/O=deskey
  456. DlpEncryption
  457. DESlock+
  458. DESlock+ Configuration...
  459. CN=Mark Anstice/O=deskey
  460. DlpEncryption
  461. DESlock+
  462. DESlock+ Configuration...
  463. (DESlock+ Configuration)DESlockConfiguration
  464. (DESlock+ Configuration)DESlockConfiguration>
  465. (DESlock+ Configuration)DESlockConfiguration>
  466. (DESlock+ Configuration)DESlockConfiguration>
  467. CN=Mark Anstice/O=deskey
  468. DlpEncryption
  469. DESlock+
  470. DESlock+ Configuration...
  471. (DESlock+ Configuration)DESlockConfiguration
  472. (DESlock+ Configuration)DESlockConfiguration>
  473. (DESlock+ Configuration)DESlockConfiguration>
  474. (DESlock+ Configuration)DESlockConfiguration>
  475. (DESlock+ Configuration)DESlockConfiguration
  476. (DESlock+ Configuration)DESlockConfiguration>
  477. (DESlock+ Configuration)DESlockConfiguration>
  478. (DESlock+ Configuration)DESlockConfiguration>
  479. CN=Mark Anstice/O=deskey
  480. DlpEncryption
  481. DESlock+ Configuration...
  482. DESlock+
  483. CN=Mark Anstice/O=deskey
  484. DlpEncryption
  485. DESlock+ Configuration...
  486. DESlock+
  487. (DESlock+ Configuration)DESlockConfiguration
  488. (DESlock+ Configuration)DESlockConfiguration>
  489. (DESlock+ Configuration)DESlockConfiguration>
  490. (DESlock+ Configuration)DESlockConfiguration>
  491. CN=Mark Anstice/O=deskey
  492. DlpEncryption
  493. DESlock+ Configuration...
  494. DESlock+
  495. (DESlock+ Configuration)DESlockConfiguration
  496. (DESlock+ Configuration)DESlockConfiguration>
  497. (DESlock+ Configuration)DESlockConfiguration>
  498. (DESlock+ Configuration)DESlockConfiguration>
  499. DESlock+'++LotusScript Development Environment:2:5:(Options):0:74
  500. Use "DlpEncryption"
  501. Option Declare
  502. '++LotusScript Development Environment:2:5:(Forward):0:1
  503. Declare Sub Postopen(Source As Notesuidocument)
  504. Declare Sub Terminate
  505. Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  506. '++LotusScript Development Environment:2:5:(Declarations):0:2
  507. '++LotusScript Development Environment:2:2:BindEvents:1:129
  508. Private Sub BindEvents(Byval Objectname_ As String)
  509.      Static Source As NOTESUIDOCUMENT
  510.      Set Source = Bind(Objectname_)
  511.      On Event Postopen From Source Call Postopen
  512.      On Event Queryopen From Source Call Queryopen
  513. End Sub
  514. '++LotusScript Development Environment:2:2:Postopen:1:12
  515. Sub Postopen(Source As Notesuidocument)
  516.      Call cmdPostOpen(Source)
  517. End Sub
  518. '++LotusScript Development Environment:2:2:Terminate:1:10
  519. Sub Terminate
  520.      
  521. End Sub
  522. '++LotusScript Development Environment:2:2:Queryopen:1:12
  523. Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
  524.      Call cmdQueryOpen(Source)
  525. End Sub
  526. <Begin DESlock+ Plugin Subform>
  527. DlpEncrypted
  528. <End DESlock+ Plugin Subform>
  529. Encrypt and Send'++LotusScript Development Environment:2:5:(Options):0:74
  530. Use "DlpEncryption"
  531. Option Declare
  532. '++LotusScript Development Environment:2:5:(Forward):0:1
  533. Declare Sub Click(Source As Button)
  534. '++LotusScript Development Environment:2:5:(Declarations):0:2
  535. '++LotusScript Development Environment:2:2:BindEvents:1:129
  536. Private Sub BindEvents(Byval Objectname_ As String)
  537.      Static Source As BUTTON
  538.      Set Source = Bind(Objectname_)
  539.      On Event Click From Source Call Click
  540. End Sub
  541. '++LotusScript Development Environment:2:2:Click:1:12
  542. Sub Click(Source As Button)
  543.      Call cmdEncryptMessage()
  544. End Sub
  545. DlpEncryptedh
  546. Windows
  547.     5S6S
  548. Encrypt Now
  549. '++LotusScript Development Environment:2:5:(Options):0:74
  550. Use "DlpEncryption"
  551. Option Declare
  552. '++LotusScript Development Environment:2:5:(Forward):0:1
  553. Declare Sub Click(Source As Button)
  554. '++LotusScript Development Environment:2:5:(Declarations):0:2
  555. '++LotusScript Development Environment:2:2:BindEvents:1:129
  556. Private Sub BindEvents(Byval Objectname_ As String)
  557.      Static Source As BUTTON
  558.      Set Source = Bind(Objectname_)
  559.      On Event Click From Source Call Click
  560. End Sub
  561. '++LotusScript Development Environment:2:2:Click:1:12
  562. Sub Click(Source As Button)
  563.      Call cmdEncryptNow()
  564. End Sub
  565. Windows
  566.     0S0E
  567. Decrypt
  568. '++LotusScript Development Environment:2:5:(Options):0:74
  569. Use "DlpEncryption"
  570. Option Declare
  571. '++LotusScript Development Environment:2:5:(Forward):0:1
  572. Declare Sub Click(Source As Button)
  573. '++LotusScript Development Environment:2:5:(Declarations):0:2
  574. '++LotusScript Development Environment:2:2:BindEvents:1:129
  575. Private Sub BindEvents(Byval Objectname_ As String)
  576.      Static Source As BUTTON
  577.      Set Source = Bind(Objectname_)
  578.      On Event Click From Source Call Click
  579. End Sub
  580. '++LotusScript Development Environment:2:2:Click:1:12
  581. Sub Click(Source As Button)
  582.      Call cmdDecryptMessage()
  583. End Sub
  584. DlpEncryptedh
  585. DlpEncrypted
  586. Windows
  587.     5S6S9S10S
  588. Decrypt Attachments '++LotusScript Development Environment:2:5:(Options):0:74
  589. Use "DlpEncryption"
  590. Option Declare
  591. '++LotusScript Development Environment:2:5:(Forward):0:1
  592. Declare Sub Click(Source As Button)
  593. '++LotusScript Development Environment:2:5:(Declarations):0:2
  594. '++LotusScript Development Environment:2:2:BindEvents:1:129
  595. Private Sub BindEvents(Byval Objectname_ As String)
  596.      Static Source As BUTTON
  597.      Set Source = Bind(Objectname_)
  598.      On Event Click From Source Call Click
  599. End Sub
  600. '++LotusScript Development Environment:2:2:Click:1:12
  601. Sub Click(Source As Button)
  602.      Call cmdDecryptAttachments()
  603. End Sub
  604. Windows
  605.     15S16S
  606. Decrypt and Reply with History'++LotusScript Development Environment:2:5:(Options):0:74
  607. Use "DlpEncryption"
  608. Option Declare
  609. '++LotusScript Development Environment:2:5:(Forward):0:1
  610. Declare Sub Click(Source As Button)
  611. '++LotusScript Development Environment:2:5:(Declarations):0:2
  612. '++LotusScript Development Environment:2:2:BindEvents:1:129
  613. Private Sub BindEvents(Byval Objectname_ As String)
  614.      Static Source As BUTTON
  615.      Set Source = Bind(Objectname_)
  616.      On Event Click From Source Call Click
  617. End Sub
  618. '++LotusScript Development Environment:2:2:Click:1:12
  619. Sub Click(Source As Button)
  620.      Call cmdDecryptForReply()
  621. End Sub
  622. DlpEncryptedh
  623. DlpEncrypted
  624. Windows
  625.     5S6S11S12S
  626. Process Key Update'++LotusScript Development Environment:2:5:(Options):0:74
  627. Use "DlpEncryption"
  628. Option Declare
  629. '++LotusScript Development Environment:2:5:(Forward):0:1
  630. Declare Sub Click(Source As Button)
  631. '++LotusScript Development Environment:2:5:(Declarations):0:2
  632. '++LotusScript Development Environment:2:2:BindEvents:1:129
  633. Private Sub BindEvents(Byval Objectname_ As String)
  634.      Static Source As BUTTON
  635.      Set Source = Bind(Objectname_)
  636.      On Event Click From Source Call Click
  637. End Sub
  638. '++LotusScript Development Environment:2:2:Click:1:12
  639. Sub Click(Source As Button)
  640.      Call cmdProcessUpdate()
  641. End Sub
  642. Windows
  643. PostedDate
  644.     15S16S23S24S25S26S
  645. Request Key
  646. '++LotusScript Development Environment:2:5:(Options):0:74
  647. Use "DlpEncryption"
  648. Option Declare
  649. '++LotusScript Development Environment:2:5:(Forward):0:1
  650. Declare Sub Click(Source As Button)
  651. '++LotusScript Development Environment:2:5:(Declarations):0:2
  652. '++LotusScript Development Environment:2:2:BindEvents:1:129
  653. Private Sub BindEvents(Byval Objectname_ As String)
  654.      Static Source As BUTTON
  655.      Set Source = Bind(Objectname_)
  656.      On Event Click From Source Call Click
  657. End Sub
  658. '++LotusScript Development Environment:2:2:Click:1:12
  659. Sub Click(Source As Button)
  660.      Call cmdRequestKey()
  661. End Sub
  662. Windows
  663.     2S3S
  664. Process Key RequestD'++LotusScript Development Environment:2:5:(Options):0:74
  665. Use "DlpEncryption"
  666. Option Declare
  667. '++LotusScript Development Environment:2:5:(Forward):0:1
  668. Declare Sub Click(Source As Button)
  669. '++LotusScript Development Environment:2:5:(Declarations):0:2
  670. '++LotusScript Development Environment:2:2:BindEvents:1:129
  671. Private Sub BindEvents(Byval Objectname_ As String)
  672.      Static Source As BUTTON
  673.      Set Source = Bind(Objectname_)
  674.      On Event Click From Source Call Click
  675. End Sub
  676. '++LotusScript Development Environment:2:2:Click:1:12
  677. Sub Click(Source As Button)
  678.      Call cmdProcessKeyRequest()
  679. End Sub
  680. Windows
  681. PostedDate
  682.     15S16S23S24S
  683. O=deskey
  684. O=deskey
  685. PURSAFO
  686. O=deskey
  687. CN=Mark Anstice/O=deskey
  688. r<5*EN
  689. PURSAFO
  690. $TITLE
  691. $Info
  692. $$Script_O
  693. $$ScriptName
  694. $$FormScript
  695. $$$FormScript_O
  696. $Body
  697. $ACTIONS
  698. $SCRIPTOBJ_0
  699. $SCRIPTOBJ_1
  700. $SCRIPTOBJ_2
  701. $SCRIPTOBJ_3
  702. $SCRIPTOBJ_4
  703. $SCRIPTOBJ_5
  704. $SCRIPTOBJ_6
  705. $SCRIPTOBJ_7
  706. CN=Mark Anstice/O=deskey
  707. DlpEncryption
  708. DESlock+ Configuration...
  709. DESlock+
  710. O=deskey
  711. O=deskey
  712. PURSAFO
  713. O=deskey
  714. CN=Mark Anstice/O=deskey
  715. r<5*EN
  716. PURSAFO
  717. $ScriptLib
  718. $ScriptLib_O
  719. $TITLE
  720. $Flags
  721. '++LotusScript Development Environment:2:5:(Options):0:74
  722. Option Declare
  723. '++LotusScript Development Environment:2:5:(Forward):0:1
  724. Declare Public Function HasReservedExtension(strFileName As String) As Integer
  725. Declare Public Function GetProfileField(strField As String) As String
  726. Declare Public Sub ShowRuntimeError
  727. Declare Public Sub cmdDecryptMessage
  728. Declare Public Sub cmdEncryptMessage
  729. Declare Public Sub cmdRequestKey
  730. Declare Function GetFileExtension(Byval strFilename As String) As String
  731. Declare Public Sub cmdProcessKeyRequest
  732. Declare Public Sub cmdProcessUpdate
  733. Declare Public Sub cmdQueryOpen(Source As NotesUIDocument)
  734. Declare Public Function EncryptBufferEx(strBuffer As String, lSerial As Long, lSlot As Long, lHasAtts As Long, lDoAtts As Long, lAttsSlot As Long, lApiFlags As Long) As Long
  735. Declare Public Sub cmdDecryptForReply
  736. Declare Public Function DoRecipientCheck(doc As NotesDocument) As Integer
  737. Declare Public Function GetSender(doc As NotesDocument) As String
  738. Declare Function InsertAttachment(doc As NotesDocument, strFileName As String) As Integer
  739. Declare Public Sub cmdDecryptAttachments
  740. Declare Public Sub cmdPostOpen(Source As NotesUIDocument)
  741. Declare Public Sub cmdEncryptNow
  742. '++LotusScript Development Environment:2:5:(Declarations):0:10
  743. Public Const DLPNOTES_TITLE = "DESlock+ Notes Plugin"
  744. Public Const MAX_TEXTLEN = 32000
  745. Public Const MB_OK = 0
  746. Public Const MB_YESNO = 4
  747. Public Const MB_ICONQUESTION    = 32
  748. Public Const MB_ICONEXCLAMATION = 48
  749. Public Const MB_ICONINFORMATION = 64
  750. Public Const IDNO = 7
  751. Public Const API_WANT_SIGNED  = &H1
  752. Public Const API_WANT_ENCRYPT = &H2
  753. Public Const API_GET_SIZE     = &H4
  754. Public Const FLAG_FORCEVIEWER  = &H1
  755. Public Const FLAG_FAILIFVIEWER = &H2
  756. Public Const FLAG_NONSTOP      = &H4
  757. Public Const DESLOCK_RESERVEDEXT   = "DLR,DLU"
  758. Public Const DESLOCK_MAXKEYNAMELEN = 16
  759. Public Const DLPNOTES_SILENT = &h1
  760. Public Const FLAG_PLAIN      = "0"
  761. Public Const FLAG_ENCRYPTED  = "1"
  762. Public Const FLAG_ENCRYPTNOW = "2"
  763. Declare Public Function DLPGetTemporaryPath Lib "DlpNotes" () As String
  764. Declare Public Function DLPGetTemporaryFileName Lib "DlpNotes" () As String
  765. Declare Public Function DLPBrowseForFolder Lib "DlpNotes" (Byval hWnd As Long) As String
  766. Declare Public Function DLPIsEncryptedBuffer Lib "DlpNotes" (Byval hWnd As Long, Byval lpszBuffer As String, Byval dwApiFlags As Long) As Long
  767. Declare Public Function DLPEncryptBufferEx Lib "DlpNotes" (Byval hWnd As Long, Byval chFlags As Integer, _
  768. Byval dwMsgFlags As Long, Byval lpBuffer As String, Byval dwSize As Long, pdwMaxSize As Long, pdwSerial As Long, _
  769. lSlot As Long, lHasAtts As Long, lDoAtts As Long, lAttSlot As Long, Byval dwApiFlags As Long) As Long
  770. Declare Public Function DLPDecryptBuffer Lib "DlpNotes" (Byval hWnd As Long, Byval lpszBuffer As String, Byval iFlags As Integer, Byval dwApiFlags As Long) As Long
  771. Declare Public Function DLPIsEncryptedFile Lib "DlpNotes"( Byval lpszFile As String) As Long
  772. Declare Public Function DLPEncryptFile Lib "DlpNotes" (Byval hWnd As Long, Byval lpszFileIn As String, Byval lpszFileOut As String, lKeySlot As Long, lpdwSerial As Long, Byval dwApiFlags As Long) As Long
  773. Declare Public Function DLPDecryptFile Lib "DlpNotes" (Byval hWnd As Long, Byval lpszFileIn As String, Byval lpszFileOut As String, Byval dwApiFlags As Long) As Long
  774. Declare Public Function DLPKeyTransferRequest Lib "DlpNotes" (Byval hWnd As Long, Byval lpszFile As String, Byval dwApiFlags As Long) As Long
  775. Declare Public Function DLPKeyTransferUpdate   Lib "DlpNotes" (Byval hWnd As Long, Byval lpszFile As String, Byval dwApiFlags As Long) As Long
  776. Declare Public Function DLPKeyTransferIssue  Lib "DlpNotes" (Byval hWnd As Long, Byval lpszInFile As String, Byval lpszOutFile As String, Byval dwApiFlags As Long) As Long
  777. Declare Public Function DLPCreateReadMeFile     Lib "DlpNotes" (Byval hWnd As Long, Byval fIsIssue As Integer, Byval dwApiFlags As Long) As Long
  778. Declare Public Function DLPGetEncryptionKeyName Lib "DlpNotes" (Byval hWnd As Long, Byval lpszFile As String, Byval lpszName As String, Byval dwApiFlags As Long) As Long
  779. '++LotusScript Development Environment:2:1:HasReservedExtension:1:8
  780. Public Function HasReservedExtension(strFileName As String) As Integer
  781.      
  782.      Dim strExt As String
  783.      
  784.      HasReservedExtension = False
  785.      
  786.      strExt = Ucase(GetFileExtension(strFileName))
  787.      
  788.      If (Len(strExt) = 0) Then Exit Function
  789.      
  790.      If (Instr(DESLOCK_RESERVEDEXT, strExt)) Then
  791.           HasReservedExtension = True
  792.      End If
  793.      
  794. End Function
  795. '++LotusScript Development Environment:2:1:GetProfileField:1:8
  796. Public Function GetProfileField(strField As String) As String
  797.      
  798.      Dim ns        As New NotesSession
  799.      Dim db        As     NotesDatabase
  800.      Dim doc       As     NotesDocument
  801.      Dim itmField  As     NotesItem
  802.      Dim strResult As     String
  803.      
  804.      Set db = ns.CurrentDatabase
  805.      If (Not(db Is Nothing)) Then
  806.           Set doc = db.GetProfileDocument("DeslockConfiguration")
  807.           If (Not(doc Is Nothing)) Then
  808.                Set itmField = doc.GetFirstItem(strField)
  809.                If (Not (itmField Is Nothing)) Then
  810.                     strResult = itmField.Values(0)
  811.                End If
  812.           End If
  813.      End If
  814.      
  815.      GetProfileField = strResult
  816.      
  817. End Function
  818. '++LotusScript Development Environment:2:2:ShowRuntimeError:1:8
  819. Public Sub ShowRuntimeError
  820.      
  821.      If (Err = 48) Then
  822.           Messagebox "Error" & Str(Err) & ": " & Error$ & ". Unable to load DlpNotes.dll, please ensure DESlock+ is installed to Encrypt/Decrypt messages.",MB_OK + MB_ICONEXCLAMATION, DLPNOTES_TITLE
  823.      Else
  824.           Messagebox "Error" & Str(Err) & ": " & Error$,MB_OK + MB_ICONEXCLAMATION, DLPNOTES_TITLE
  825.      End If
  826. End Sub
  827. '++LotusScript Development Environment:2:2:cmdDecryptMessage:3:8
  828. Public Sub cmdDecryptMessage
  829.      Dim uiWs    As New NotesUIWorkspace
  830.      Dim uiDoc   As     NotesUIDocument
  831.      Dim doc     As     NotesDocument
  832.      Dim varBody As     Variant
  833.      Dim lResult As     Long
  834.      
  835.      On Error Goto ErrorTrap
  836.      
  837.      Set uiDoc = uiWs.CurrentDocument
  838.      Set doc   = uiDoc.Document
  839.      
  840.      Dim itmItem As Variant
  841.      
  842.      Set itmItem = doc.GetFirstItem("DlpEncrypted")
  843.      If (itmItem Is Nothing) Then
  844.           Msgbox "Unable to determine if this document is encrypted.", _
  845.           MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  846.           Exit Sub
  847.      End If
  848.      
  849.      If ( (itmItem.Values(0) = FLAG_ENCRYPTED) Or (itmItem.Values(0) = FLAG_ENCRYPTNOW) ) Then
  850.           Dim strBuffer As String
  851.           Set varBody = doc.GetFirstItem("Body")
  852.           
  853.           Select Case varBody.Type
  854.           Case RICHTEXT
  855.                strBuffer = varBody.GetFormattedText(True, 0)
  856.           Case TEXT
  857.                strBuffer = VarBody.Text
  858.           End Select
  859.           
  860.           If (Len(strBuffer) >= MAX_TEXTLEN) Then
  861.                Msgbox "Unable to decrypt more than 32K of data.", MB_ICONEXCLAMATION + MB_OK, DLPNOTES_TITLE
  862.                Exit Sub
  863.           End If
  864.           
  865.           Dim iFlags As Integer
  866.           If (GetProfileField("SetForceViewer") = "1") Then
  867.                iFlags = FLAG_FORCEVIEWER
  868.           End If
  869.           
  870.           lResult = DLPDecryptBuffer(0, strBuffer, iFlags, 0)
  871.           If (lResult <> 0) Then Exit Sub
  872.           
  873.           strBuffer = Left(strBuffer, Instr(strBuffer, Chr(0)) -1)
  874.           
  875.           If (Len(strBuffer)) Then
  876.                uiDoc.EditMode = True
  877.                Call doc.ReplaceItemValue("$ContentIcon", 0)  
  878.                Call uiDoc.FieldSetText("Body", strBuffer)
  879.                Call uiDoc.FieldSetText("DlpEncrypted", FLAG_PLAIN)
  880.                Call uiDoc.Refresh()
  881.           End If
  882.      End If        
  883.      Exit Sub
  884.      
  885. ErrorTrap:
  886.      Call ShowRuntimeError()
  887.      Exit Sub
  888. End Sub
  889. '++LotusScript Development Environment:2:2:cmdEncryptMessage:1:8
  890. Public Sub cmdEncryptMessage
  891.      
  892.      Dim uiWs    As New NotesUIWorkspace
  893.      Dim uiDoc   As     NotesUIDocument
  894.      Dim doc     As     NotesDocument
  895.      Dim obj     As     NotesEmbeddedObject
  896.      Dim varBody As     Variant
  897.      Dim lResult As     Long
  898.      
  899.      Dim strPath As     String
  900.      Dim strInFilePath As String
  901.      
  902.      On Error Goto ErrorTrap
  903.      
  904.      ' get current document
  905.      Set uiDoc = uiWs.CurrentDocument
  906.      Set doc   = uiDoc.Document
  907.      
  908.      uiDoc.EditMode = True
  909.      
  910.      Call uiDoc.Refresh()
  911.      Call uiDoc.Save()
  912.      
  913.      If (DoRecipientCheck(doc) = False) Then
  914.           Msgbox "You have not specified any recipients!", MB_OK + MB_ICONEXCLAMATION, DLPNOTES_TITLE
  915.           Exit Sub 
  916.      End If
  917.      
  918.      Dim strBuffer As String
  919.      Set varBody = doc.GetFirstItem("Body")
  920.      
  921.      Select Case varBody.Type
  922.      Case RICHTEXT
  923.           strBuffer = varBody.GetFormattedText(True, 0)
  924.           If (Len(strBuffer) > 0) Then
  925.                If (GetProfileField("SetShowFormattedWarning") = "1") Then
  926.                     If (Msgbox("Please note that all rich text formatting will be removed. Do you wish to continue?", _
  927.                     MB_YESNO + MB_ICONQUESTION, DLPNOTES_TITLE) = IDNO) Then Exit Sub
  928.                End If
  929.           End If
  930.      Case TEXT
  931.           strBuffer = VarBody.Text
  932.      End Select
  933.      
  934.      Dim strSubject As String
  935.      strSubject = doc.GetFirstItem("Subject").Values(0)
  936.      
  937.      If ( (Len(strBuffer) = 0) And ( (GetProfileField("SetObscureSubject") <> "1") Or (Len(strSubject) = 0)) ) Then
  938.           Msgbox "There is no message to encrypt!", MB_ICONEXCLAMATION, DLPNOTES_TITLE
  939.           Exit Sub
  940.      End If
  941.      
  942.      If (Len(strBuffer) >= MAX_TEXTLEN - 1) Then
  943.           Msgbox "Unable to encrypt more than 32K of data.", MB_ICONEXCLAMATION + MB_OK, DLPNOTES_TITLE
  944.           Exit Sub
  945.      End If
  946.      
  947.      If (Right$(strBuffer, 1) <> Chr(10)) Then strBuffer = strBuffer + Chr(10)
  948.      
  949.      If (GetProfileField("SetObscureSubject") = "1") Then
  950.           strBuffer = "Subject : " + strSubject + Chr(10) + Chr(10) + strBuffer
  951.           strSubject = "A DESlock+ Encrypted Message"
  952.      End If
  953.      
  954.      Dim lAttachments As Long
  955.      Dim lHasAttachments As Long
  956.      
  957.      strPath = DLPGetTemporaryPath()
  958.      
  959.      If ( varBody.Type = RICHTEXT ) Then
  960.           If (Isarray(varBody.EmbeddedObjects)) Then
  961.                Forall o In varBody.EmbeddedObjects
  962.                     If ( o.Type = EMBED_ATTACHMENT ) Then
  963.                          ' do some additional checking...    
  964.                          strInFilePath = strPath + o.Source
  965.                          
  966.                          Call o.ExtractFile( strInFilePath )
  967.                          
  968.                          If ( (HasReservedExtension(strInFilePath) = False) And (DLPIsEncryptedFile(strInFilePath) <> 0) ) Then
  969.                               lAttachments = lAttachments + 1
  970.                               Redim Preserve astrAttach(lAttachments)
  971.                               astrAttach(lAttachments) = o.Source
  972.                          End If
  973.                          
  974.                          Kill (strInFilePath)
  975.                     End If
  976.                End Forall
  977.           End If
  978.      End If
  979.      
  980.      If (lAttachments > 0) Then lHasAttachments = 1
  981.      
  982.      Dim lSerial As Long
  983.      Dim lSlot As Long
  984.      Dim lAttsSlot As Long
  985.      Dim lDoAtts As Long
  986.      
  987.      lSlot = -1
  988.      lAttsSlot = -1
  989.      
  990.      lResult = EncryptBufferEx(strBuffer, lSerial, lSlot, lHasAttachments, lDoAtts, lAttsSlot, 0) 
  991.      
  992.      If (lResult <> 0) Then Exit Sub
  993.      
  994.      If (lHasAttachments And lDoAtts) Then
  995.           Dim strOutFilePath As String  
  996.           
  997.           Forall strAttach In astrAttach 
  998.                Set obj = doc.GetAttachment(strAttach)
  999.                If (Not (obj Is Nothing)) Then        
  1000.                     strInFilePath = strPath + obj.Source
  1001.                     strOutFilePath = strInFilePath & ".dlp"
  1002.                     
  1003.                     Call obj.ExtractFile( strInFilePath )
  1004.                     
  1005.                     If ( (HasReservedExtension(strInFilePath) = False) And (DLPIsEncryptedFile(strInFilePath) <> 0) ) Then
  1006.                          lResult = DLPEncryptFile(0, strInFilePath, strOutFilePath, lAttsSlot, lSerial, 0)
  1007.                          
  1008.                          If (lResult = 0) Then
  1009.                               Call obj.Remove()
  1010.                               Call InsertAttachment(doc, strOutFilePath)
  1011.                               Kill strInFilePath
  1012.                               Kill strOutFilePath
  1013.                          End If
  1014.                     Else
  1015.                          Call obj.Remove()
  1016.                          Call InsertAttachment(doc, strInFilePath) 
  1017.                          Kill strInFilePath
  1018.                     End If
  1019.                End If
  1020.           End Forall
  1021.      End If
  1022.      
  1023.      Dim  dtCurrent As New NotesDateTime("")
  1024.      Call dtCurrent.SetNow()
  1025.      
  1026.      Call doc.ReplaceItemValue("PostedDate", dtCurrent)
  1027.      Call doc.ReplaceItemValue("$ContentIcon", 62)
  1028.      Call doc.ReplaceItemValue("Subject", strSubject)
  1029.      Call doc.ReplaceItemValue("DlpEncrypted", FLAG_ENCRYPTED)
  1030.      'varBody.Values = strBuffer
  1031.      Call doc.ReplaceItemValue("Body", strBuffer)
  1032.      
  1033.      Call doc.Save(True, False) 
  1034.      Call doc.Send(False)
  1035.      
  1036.      Call doc.ReplaceItemValue("MailOptions", "0")
  1037.      Call doc.ReplaceItemValue("SaveOptions", "0")
  1038.      
  1039.      Call uidoc.Close()
  1040.      Exit Sub
  1041.      
  1042. ErrorTrap:
  1043.      Call ShowRuntimeError()
  1044.      Exit Sub 
  1045. End Sub
  1046. '++LotusScript Development Environment:2:2:cmdRequestKey:1:8
  1047. Public Sub cmdRequestKey
  1048.      Dim uiWs    As New NotesUIWorkspace
  1049.      Dim uiDoc   As     NotesUIDocument
  1050.      Dim doc     As     NotesDocument
  1051.      
  1052.      Dim lResult As Long
  1053.      
  1054.      On Error Goto ErrorTrap
  1055.      
  1056.      Set uiDoc = uiWs.CurrentDocument
  1057.      Set doc = uiDoc.Document
  1058.      
  1059.      uiDoc.EditMode = True
  1060.      
  1061.      Call uiDoc.Refresh()
  1062.      Call uiDoc.Save()
  1063.      
  1064.      Dim strTempPath As String
  1065.      strTempPath = DLPGetTemporaryPath()
  1066.      
  1067.      Dim strRequestPath As String
  1068.      strRequestPath = strTempPath + String$(100,0)
  1069.      lResult = DLPKeyTransferRequest(0, strRequestPath, 0)
  1070.      
  1071.      If (lResult = 0) Then
  1072.           Call InsertAttachment(doc, strRequestPath)
  1073.           Kill strRequestPath
  1074.           
  1075.           If(DLPCreateReadMeFile(0, True, 0) = 0) Then
  1076.                Call InsertAttachment(doc, strTempPath + "readme.txt")
  1077.                Kill strTempPath + "readme.txt"
  1078.           End If    
  1079.           
  1080.           Call doc.ReplaceItemValue("$ContentIcon", 160) 
  1081.           Call doc.Save(True, False)
  1082.           Call doc.ReplaceItemValue("MailOptions", "0")
  1083.           Call doc.ReplaceItemValue("SaveOptions", "0")
  1084.           
  1085.           Call uidoc.Close()
  1086.           
  1087.           Call uiWs.EditDocument(True, doc, False)
  1088.      End If
  1089.      Exit Sub
  1090.      
  1091. ErrorTrap:
  1092.      Call ShowRuntimeError()
  1093.      Exit Sub
  1094. End Sub
  1095. '++LotusScript Development Environment:2:1:GetFileExtension:1:8
  1096. Function GetFileExtension(Byval strFilename As String) As String
  1097.      Dim ns        As New NotesSession
  1098.      Dim iDelimPos As Integer
  1099.      Dim iExtPos   As Integer
  1100.      Dim i         As Integer
  1101.      Dim j         As Integer
  1102.      Dim strDelim  As String
  1103.      
  1104.      If (Instr(ns.Platform, "Windows")) Then
  1105.           strDelim = "\" 
  1106.      Else
  1107.           strDelim = "/"
  1108.      End If
  1109.      
  1110.      ' Loop through Filename
  1111.      For i = Len(strFilename) To 1 Step -1
  1112.           If Mid(strFilename, i, 1) = "." Then
  1113.                iExtPos = i
  1114.                ' Locate the last slash in the string
  1115.                For j = Len(strFilename) To 1 Step -1
  1116.                     If Mid(strFilename, j, 1) = strDelim Then
  1117.                          iDelimPos = j
  1118.                          Exit For
  1119.                     End If
  1120.                Next j
  1121.                Exit For
  1122.           End If
  1123.      Next i
  1124.      
  1125.      If (iDelimPos > iExtPos) Then
  1126.           Exit Function
  1127.      Else
  1128.           If (iExtPos > 0) Then GetFileExtension = Mid(strFilename, iExtPos + 1,Len(strFilename) - iExtPos)
  1129.      End If
  1130. End Function 
  1131. '++LotusScript Development Environment:2:2:cmdProcessKeyRequest:1:8
  1132. Public Sub cmdProcessKeyRequest
  1133.      
  1134.      Dim uiWs    As New NotesUIWorkspace
  1135.      Dim ns      As New NotesSession
  1136.      Dim uiDoc   As     NotesUIDocument
  1137.      Dim doc     As     NotesDocument
  1138.      Dim obj     As     NotesEmbeddedObject
  1139.      Dim strRequestFile As String
  1140.      
  1141.      On Error Goto ErrorTrap
  1142.      
  1143.      Set uiDoc = uiWs.CurrentDocument
  1144.      Set doc   = uiDoc.Document
  1145.      
  1146.      If (Not doc.HasEmbedded) Then
  1147.           Msgbox "The current document does not have any DESlock+ request files attached.", _
  1148.           MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  1149.           Exit Sub
  1150.      End If
  1151.      
  1152.      Dim strSender As String
  1153.      Dim strSubject As String
  1154.      
  1155.      strSender  = GetSender(doc)
  1156.      strSubject = doc.GetFirstItem("Subject").Values(0)
  1157.      If (strSubject = "") Then 
  1158.           strSubject = "DESlock+ Key Update"
  1159.      Else
  1160.           If (Left$(strSubject, 3) <> "Re:") Then strSubject = "Re: " + strSubject
  1161.      End If
  1162.      
  1163.      Forall itmItem In doc.Items
  1164.           Select Case itmItem.Type
  1165.           Case ATTACHMENT
  1166.                Set obj = doc.GetAttachment(itmItem.Values(0))
  1167.                If (Not (obj Is Nothing)) Then
  1168.                     If (Ucase(GetFileExtension(obj.Source)) = "DLR") Then
  1169.                          strRequestFile = obj.Source
  1170.                          Exit Forall
  1171.                     End If
  1172.                End If
  1173.           End Select
  1174.      End Forall 
  1175.      
  1176.      If ( strRequestFile = "" ) Then 
  1177.           Msgbox "The current document does not have any DESlock+ request files attached.", _
  1178.           MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  1179.           Exit Sub
  1180.      End If
  1181.      
  1182.      Set obj = doc.GetAttachment(strRequestFile)
  1183.      If (Not (obj Is Nothing)) Then
  1184.           Dim strTempPath As String
  1185.           Dim strRequestPath As String
  1186.           Dim strUpdateFile As String
  1187.           
  1188.           strTempPath = DLPGetTemporaryPath()
  1189.           
  1190.           strRequestPath = strTempPath + strRequestFile
  1191.           
  1192.           Call obj.ExtractFile(strRequestPath)
  1193.           
  1194.           strUpdateFile = DLPGetTemporaryFileName()
  1195.           
  1196.           If (Len(strUpdateFile)) Then    
  1197.                Dim lResult As Long
  1198.                
  1199.                lResult = DLPKeyTransferIssue(0, strRequestPath, strUpdateFile, 0)
  1200.                
  1201.                Kill strRequestPath
  1202.                
  1203.                If (lResult = 0) Then
  1204.                     Dim strKeyName As String
  1205.                     
  1206.                     strKeyName = String$(DESLOCK_MAXKEYNAMELEN + 1, 0)
  1207.                     
  1208.                     If (DLPGetEncryptionKeyName(0, strUpdateFile, strKeyName, DLPNOTES_SILENT ) = 0) Then
  1209.                          strKeyName = Left$(strKeyName, Instr(strKeyName, Chr(0)) -1 )
  1210.                          Dim  newdoc As NotesDocument
  1211.                          Set  uiDoc = uiWs.ComposeDocument( "", "", "Reply" )
  1212.                          Set  newdoc = uiDoc.Document
  1213.                          Call uiDoc.Save()
  1214.                          
  1215.                          Name strUpdateFile As strTempPath + strKeyName + ".dlu"
  1216.                          Call InsertAttachment(newdoc, strTempPath + strKeyName + ".dlu")
  1217.                          Kill strTempPath + strKeyName + ".dlu"
  1218.                          
  1219.                          If (DLPCreateReadMeFile(0, False, 0) = 0) Then   
  1220.                               Call InsertAttachment(newdoc, strTempPath + "readme.txt")
  1221.                               Kill strTempPath + "readme.txt"
  1222.                          End If
  1223.                          
  1224.                          Call newdoc.ReplaceItemValue("$ContentIcon", 61) 
  1225.                          Call newdoc.Save(True, False)
  1226.                          Call newdoc.ReplaceItemValue("MailOptions", "0")
  1227.                          Call newdoc.ReplaceItemValue("SaveOptions", "0")
  1228.                          
  1229.                          Call uiDoc.Close()
  1230.                          Set  uiDoc = uiWs.EditDocument(True, newdoc, False)
  1231.                          Call uiDoc.FieldSetText("SendTo", strSender)
  1232.                          Call uiDoc.FieldSetText("Subject", strSubject)     
  1233.                     End If
  1234.                End If 
  1235.           End If
  1236.      End If
  1237.      Exit Sub
  1238.      
  1239. ErrorTrap:
  1240.      Call ShowRuntimeError()
  1241.      Exit Sub
  1242. End Sub
  1243. '++LotusScript Development Environment:2:2:cmdProcessUpdate:1:8
  1244. Public Sub cmdProcessUpdate
  1245.      
  1246.      Dim uiWs    As New NotesUIWorkspace
  1247.      Dim uiDoc   As     NotesUIDocument
  1248.      Dim doc     As     NotesDocument
  1249.      Dim iGotAtt As     Integer
  1250.      
  1251.      On Error Goto ErrorTrap
  1252.      
  1253.      Set uiDoc = uiWs.CurrentDocument 
  1254.      Set doc   = uiDoc.Document
  1255.      
  1256.      Forall itmItem In doc.Items
  1257.           Select Case itmItem.Type
  1258.           Case ATTACHMENT
  1259.                Dim object As NotesEmbeddedObject
  1260.                
  1261.                Set object = doc.GetAttachment(itmItem.Values(0))
  1262.                If (Not (object Is Nothing)) Then
  1263.                     If (Ucase(GetFileExtension(object.Source)) = "DLU") Then
  1264.                          iGotAtt = True
  1265.                          
  1266.                          Dim strFileName As String
  1267.                          strFileName = DLPGetTemporaryFileName()
  1268.                          
  1269.                          If (Len(strFileName)) Then
  1270.                               Call object.ExtractFile(strFileName)
  1271.                               Call DLPKeyTransferUpdate(0, strFileName, 0)
  1272.                               Kill strFileName
  1273.                          End If
  1274.                     End If
  1275.                End If
  1276.           End Select
  1277.      End Forall 
  1278.      
  1279.      If (iGotAtt = False ) Then
  1280.           Msgbox "The current document does not have any DESlock+ update files attached.", _
  1281.           MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  1282.      End If
  1283.      
  1284.      Exit Sub
  1285.      
  1286. ErrorTrap:
  1287.      Call ShowRuntimeError()
  1288.      Exit Sub
  1289. End Sub
  1290. '++LotusScript Development Environment:2:2:cmdQueryOpen:1:8
  1291. Public Sub cmdQueryOpen(Source As NotesUIDocument)
  1292.      Dim doc       As NotesDocument
  1293.      Dim strBuffer As String
  1294.      Dim varBody   As Variant
  1295.      
  1296.      On Error Goto ErrorTrap
  1297.      
  1298.      Set doc = source.Document
  1299.      
  1300.      If (doc Is Nothing) Then Exit Sub
  1301.      
  1302.      Set varBody = doc.GetFirstItem("Body")
  1303.      
  1304.      If (VarBody Is Nothing) Then Exit Sub
  1305.      
  1306.      Select Case varBody.Type
  1307.      Case RICHTEXT
  1308.           strBuffer = varBody.GetFormattedText(True, 0)
  1309.      Case TEXT
  1310.           strBuffer = VarBody.Text
  1311.      End Select
  1312.      
  1313.      If (strBuffer <> "") Then
  1314.           If (DLPIsEncryptedBuffer(0, strBuffer, DLPNOTES_SILENT) = 0) Then          
  1315.                If (doc.GetItemValue("DlpEncrypted")(0) <> "1") Then
  1316.                     Call doc.ReplaceItemValue("DlpEncrypted", FLAG_ENCRYPTED)
  1317.                     Call doc.ReplaceItemValue("$ContentIcon", 62)
  1318.                     Call doc.Save(True, False)
  1319.                End If
  1320.           End If
  1321.      End If  
  1322.      Exit Sub
  1323.      
  1324. ErrorTrap:
  1325.      Call ShowRuntimeError()
  1326.      Exit Sub
  1327. End Sub
  1328. '++LotusScript Development Environment:2:1:EncryptBufferEx:1:8
  1329. Public Function EncryptBufferEx(strBuffer As String, lSerial As Long, lSlot As Long, lHasAtts As Long, lDoAtts As Long, lAttsSlot As Long, lApiFlags As Long) As Long
  1330.      Dim lLength As Long
  1331.      Dim lResult As Long
  1332.      Dim lSize   As Long
  1333.      Dim DoAtts  As Long
  1334.      
  1335.      DoAtts = lDoAtts
  1336.      lLength = Len(strBuffer)
  1337.      
  1338.      Dim lFlags As Long
  1339.      If (GetProfileField("SetRecipientForceViewer") = "1") Then
  1340.           lFlags = FLAG_FORCEVIEWER
  1341.      End If
  1342.      
  1343.      If (GetProfileField("SetAutoEncryptAttachments") = "1") Then
  1344.           DoAtts = 1
  1345.      End If
  1346.      
  1347.      lResult = DLPEncryptBufferEx(0, API_WANT_ENCRYPT + API_GET_SIZE, lFlags, strBuffer, lLength, lSize, lSerial, lSlot, lHasAtts, DoAtts, lAttsSlot, lApiFlags)
  1348.      
  1349.      If (lResult = 0) Then
  1350.           If (lSize >= MAX_TEXTLEN) Then
  1351.                Msgbox "Unable to encrypt more than 32K of data.", MB_ICONEXCLAMATION + MB_OK, DLPNOTES_TITLE
  1352.                EncryptBufferEx = 1
  1353.                Exit Function
  1354.           End If
  1355.           
  1356.           strBuffer = strBuffer + String$(lSize - lLength, 0)
  1357.           
  1358.           lResult = DLPEncryptBufferEx(0, API_WANT_ENCRYPT, lFlags, strBuffer, lLength, lSize, lSerial, lSlot, lHasAtts, DoAtts, lAttsSlot, lApiFlags)
  1359.           If (lResult = 0) Then
  1360.                strBuffer = Left$(strBuffer, lSize)
  1361.           End If 
  1362.      End If
  1363.      
  1364.      lDoAtts = DoAtts
  1365.      
  1366.      EncryptBufferEx = lResult
  1367. End Function
  1368. '++LotusScript Development Environment:2:2:cmdDecryptForReply:1:8
  1369. Public Sub cmdDecryptForReply
  1370.      
  1371.      Dim uiWs    As New NotesUIWorkspace
  1372.      Dim uiDoc   As     NotesUIDocument
  1373.      Dim doc     As     NotesDocument
  1374.      Dim varBody As Variant
  1375.      Dim lResult As Long
  1376.      
  1377.      On Error Goto ErrorTrap
  1378.      
  1379.      Set uiDoc = uiWs.CurrentDocument
  1380.      Set doc = uiDoc.Document
  1381.      
  1382.      Dim itmItem As Variant
  1383.      
  1384.      Set itmItem = doc.GetFirstItem("DlpEncrypted")
  1385.      If (itmItem Is Nothing) Then
  1386.           Msgbox "Unable to determine if this document is encrypted.",  MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  1387.           Exit Sub
  1388.      End If
  1389.      
  1390.      Dim iState As Integer
  1391.      Dim strMailDate As String
  1392.      Dim strSender As String
  1393.      Dim strSubject As String
  1394.      
  1395.      ' the memo may not have been send yet (Encrypt Now)
  1396.      If (doc.HasItem("PostedDate")) Then
  1397.           strMailDate = doc.GetFirstItem("PostedDate").Text     
  1398.      Else
  1399.           Dim  dtCurrent As New NotesDateTime("")
  1400.           Call dtCurrent.SetNow()
  1401.           strMailDate = dtCurrent.DateOnly() + " " + dtCurrent.TimeOnly()
  1402.      End If
  1403.      
  1404.      strSender   = GetSender(doc)
  1405.      strSubject  = doc.GetFirstItem("Subject").Text
  1406.      
  1407.      If (Left$(strSubject, 3) <> "Re:") Then strSubject = "Re: " + strSubject 
  1408.      
  1409.      If ( (itmItem.Values(0) = FLAG_ENCRYPTED) Or (itmItem.Values(0) = FLAG_ENCRYPTNOW) ) Then
  1410.           Dim strBuffer As String
  1411.           
  1412.           Set varBody = doc.GetFirstItem("Body")
  1413.           Select Case varBody.Type
  1414.           Case RICHTEXT
  1415.                strBuffer = varBody.GetFormattedText(True, 0)
  1416.           Case TEXT
  1417.                strBuffer = VarBody.Text
  1418.           End Select
  1419.           
  1420.           If (Len(strBuffer) >= MAX_TEXTLEN) Then
  1421.                Msgbox "Unable to decrypt more than 32K of data.", MB_ICONEXCLAMATION + MB_OK, DLPNOTES_TITLE
  1422.                Exit Sub
  1423.           End If
  1424.           
  1425.           lResult = DLPDecryptBuffer(0, strBuffer, FLAG_FAILIFVIEWER + FLAG_NONSTOP, 0)
  1426.           
  1427.           If (lResult <> 0) Then Exit Sub
  1428.           
  1429.           strBuffer = Left$(strBuffer, Instr (strBuffer, Chr(0)) -1)
  1430.           
  1431.           Set  uiDoc = uiWs.ComposeDocument("", "", "Reply")
  1432.           Call uiDoc.FieldSetText("SendTo", strSender)
  1433.           Call uiDoc.FieldSetText("Subject", strSubject)
  1434.           Call uiDoc.FieldAppendText("Body", Chr(10) + Chr(10) + strSender + " wrote on " + strMailDate + ":" + Chr(10))
  1435.           
  1436.           Dim lCount  As Long
  1437.           Dim lLength As Long
  1438.           Dim strChar As String
  1439.           Dim strTemp As String
  1440.           
  1441.           lLength = Len(strBuffer)
  1442.           
  1443.           For lCount = 1 To lLength
  1444.                strChar = Mid(strBuffer, lCount, 1)
  1445.                If (strChar <> Chr(13)) Then
  1446.                     If ( (strChar <> Chr(10)) And (lCount <> lLength) ) Then 
  1447.                          strTemp = strTemp + strChar
  1448.                     Else 
  1449.                          Call uiDoc.FieldAppendText("Body", "> " + strTemp + Chr(13) + Chr(10) )
  1450.                          strTemp = ""
  1451.                     End If
  1452.                End If
  1453.           Next
  1454.           
  1455.           Call uiDoc.Refresh()
  1456.           Call uiDoc.GotoField("Body")
  1457.      End If 
  1458.      
  1459.      Exit Sub
  1460.      
  1461. ErrorTrap:
  1462.      Call ShowRuntimeError()
  1463.      Exit Sub
  1464. End Sub
  1465. '++LotusScript Development Environment:2:1:DoRecipientCheck:1:8
  1466. Public Function DoRecipientCheck(doc As NotesDocument) As Integer
  1467.      
  1468.      Dim astrFieldNames(3) As String
  1469.      Dim varField As Variant
  1470.      
  1471.      DoRecipientCheck = False
  1472.      
  1473.      astrFieldNames(0) = "SendTo"
  1474.      astrFieldNames(1) = "CopyTo"
  1475.      astrFieldNames(2) = "BlindCopyTo"
  1476.      
  1477.      Forall recipFieldName In astrFieldNames
  1478.           varField = doc.GetItemValue(recipFieldName)
  1479.           If (Not (Isempty(varField))) Then
  1480.                Forall recipName In varField
  1481.                     If (recipName <> "") Then
  1482.                          DoRecipientCheck = True
  1483.                          Exit Function
  1484.                     End If
  1485.                End Forall
  1486.           End If
  1487.      End Forall
  1488.      
  1489. End Function
  1490. '++LotusScript Development Environment:2:1:GetSender:1:8
  1491. Public Function GetSender(doc As NotesDocument) As String
  1492.      
  1493.      Dim nnName As NotesName
  1494.      Dim strSender As String
  1495.      
  1496.      strSender = doc.GetFirstItem("From").Values(0)
  1497.      
  1498.      Set nnName = New NotesName(strSender)
  1499.      If (nnName.IsHierarchical) Then
  1500.           strSender = nnName.Common
  1501.      End If
  1502.      
  1503.      GetSender = strSender
  1504.      
  1505. End Function
  1506. '++LotusScript Development Environment:2:1:InsertAttachment:1:8
  1507. Function InsertAttachment(doc As NotesDocument, strFileName As String) As Integer
  1508.      
  1509.      Dim varBody As Variant
  1510.      
  1511.      InsertAttachment = False
  1512.      
  1513.      Set varBody = doc.GetFirstItem("Body")
  1514.      If (Not (varBody Is Nothing)) Then
  1515.           Call varBody.EmbedObject(EMBED_ATTACHMENT, "", strFileName)
  1516.           InsertAttachment = True
  1517.      End If
  1518. End Function
  1519. '++LotusScript Development Environment:2:2:cmdDecryptAttachments:1:8
  1520. Public Sub cmdDecryptAttachments
  1521.      Dim uiWs    As New NotesUIWorkspace
  1522.      Dim uiDoc   As     NotesUIDocument
  1523.      Dim doc     As     NotesDocument
  1524.      Dim lAttach As     Long
  1525.      
  1526.      On Error Goto ErrorTrap
  1527.      
  1528.      Set uiDoc = uiWs.CurrentDocument 
  1529.      Set doc   = uiDoc.Document
  1530.      
  1531.      If (Not (doc.HasEmbedded) ) Then Exit Sub
  1532.      
  1533.      Dim strFolder  As String
  1534.      Dim strInFile  As String
  1535.      Dim strOutFile As String
  1536.      
  1537.      strFolder = DLPBrowseForFolder(0) 
  1538.      If (Len(strFolder) = 0) Then Exit Sub
  1539.      
  1540.      Forall items In doc.Items
  1541.           Select Case Items.Type
  1542.           Case ATTACHMENT
  1543.                Dim obj As NotesEmbeddedObject
  1544.                
  1545.                Set obj = doc.GetAttachment(items.Values(0))
  1546.                If (Not (obj Is Nothing)) Then
  1547.                     If (Ucase(GetFileExtension(obj.Source)) = "DLP") Then
  1548.                          strInFile = strFolder + obj.Source
  1549.                          Call obj.ExtractFile(strInFile)
  1550.                          
  1551.                          If (DLPIsEncryptedFile(strInFile) = 0) Then
  1552.                               strOutFile = Left$(strInFile, Len(strInfile) - 4)
  1553.                               If ( DLPDecryptFile(0, strInFile, strOutFile, 0) = 0) Then
  1554.                                    lAttach = lAttach + 1
  1555.                               End If
  1556.                          End If
  1557.                          
  1558.                          Kill strInFile
  1559.                     End If
  1560.                End If
  1561.           End Select
  1562.      End Forall 
  1563.      
  1564.      If (lAttach > 0) Then
  1565.           Msgbox "Sucessfully decrypted " + Cstr(lAttach) + " file(s) to " + strFolder + ".", _
  1566.           MB_OK + MB_ICONINFORMATION, DLPNOTES_TITLE
  1567.      End If
  1568.      Exit Sub
  1569.      
  1570. ErrorTrap:
  1571.      Call ShowRuntimeError()
  1572.      Exit Sub
  1573. End Sub
  1574. '++LotusScript Development Environment:2:2:cmdPostOpen:1:8
  1575. Public Sub cmdPostOpen(Source As NotesUIDocument)
  1576.      Dim doc       As NotesDocument
  1577.      Dim strBuffer As String
  1578.      Dim varBody   As Variant
  1579.      
  1580.      On Error Goto ErrorTrap
  1581.      
  1582.      Set doc = source.Document
  1583.      If (doc Is Nothing) Then Exit Sub
  1584.      
  1585.      ' we are only interested in sent memo's
  1586.      If (Not (doc.HasItem("PostedDate"))) Then Exit Sub
  1587.      If (doc.GetItemValue("PostedDate")(0) = "") Then Exit Sub
  1588.      
  1589.      Set varBody = doc.GetFirstItem("Body")
  1590.      If (VarBody Is Nothing) Then Exit Sub
  1591.      
  1592.      Select Case varBody.Type
  1593.      Case RICHTEXT
  1594.           strBuffer = varBody.GetFormattedText(True, 0)
  1595.      Case TEXT
  1596.           strBuffer = VarBody.Text
  1597.      End Select
  1598.      
  1599.      If (strBuffer <> "") Then
  1600.           If (DLPIsEncryptedBuffer(0, strBuffer, DLPNOTES_SILENT) = 0) Then                   
  1601.                If (GetProfileField("SetAutoDecryptBodies") = "1") Then
  1602.                     If ( Not (Source.InPreviewPane ) ) Then
  1603.                          Call cmdDecryptMessage()
  1604.                     End If
  1605.                End If
  1606.           End If
  1607.      End If  
  1608.      Exit Sub
  1609.      
  1610. ErrorTrap:
  1611.      Call ShowRuntimeError()
  1612.      Exit Sub
  1613. End Sub
  1614. '++LotusScript Development Environment:2:2:cmdEncryptNow:1:8
  1615. Public Sub cmdEncryptNow
  1616.      Dim uiWs    As New NotesUIWorkspace
  1617.      Dim uiDoc   As     NotesUIDocument
  1618.      Dim doc     As     NotesDocument
  1619.      Dim obj     As     NotesEmbeddedObject
  1620.      Dim varBody As     Variant
  1621.      Dim lResult As     Long
  1622.      
  1623.      Dim strPath As     String
  1624.      Dim strInFilePath As String
  1625.      
  1626.      On Error Goto ErrorTrap
  1627.      
  1628.      ' get current document
  1629.      Set uiDoc = uiWs.CurrentDocument
  1630.      Set doc   = uiDoc.Document
  1631.      
  1632.      uiDoc.EditMode = True
  1633.      
  1634.      Call uiDoc.Refresh()
  1635.      Call uiDoc.Save()
  1636.      
  1637.      Dim strBuffer As String
  1638.      Set varBody = doc.GetFirstItem("Body")
  1639.      
  1640.      Select Case varBody.Type
  1641.      Case RICHTEXT
  1642.           strBuffer = varBody.GetFormattedText(True, 0)
  1643.           If (Len(strBuffer) > 0) Then
  1644.                If (GetProfileField("SetShowFormattedWarning") = "1") Then
  1645.                     If (Msgbox("Please note that all rich text formatting will be removed. Do you wish to continue?", _
  1646.                     MB_YESNO + MB_ICONQUESTION, DLPNOTES_TITLE) = IDNO) Then Exit Sub
  1647.                End If
  1648.           End If
  1649.      Case TEXT
  1650.           strBuffer = VarBody.Text
  1651.      End Select
  1652.      
  1653.      If (Len(strBuffer) = 0) Then
  1654.           Msgbox "There is no message to encrypt!", MB_ICONEXCLAMATION, DLPNOTES_TITLE
  1655.           Exit Sub
  1656.      End If
  1657.      
  1658.      If (Len(strBuffer) >= MAX_TEXTLEN - 1) Then
  1659.           Msgbox "Unable to encrypt more than 32K of data.", MB_ICONEXCLAMATION + MB_OK, DLPNOTES_TITLE
  1660.           Exit Sub
  1661.      End If
  1662.      
  1663.      If (Right$(strBuffer, 1) <> Chr(10)) Then strBuffer = strBuffer + Chr(10)
  1664.      
  1665.      Dim lAttachments As Long
  1666.      Dim lHasAttachments As Long
  1667.      
  1668.      strPath = DLPGetTemporaryPath()
  1669.      
  1670.      If ( varBody.Type = RICHTEXT ) Then
  1671.           If (Isarray(varBody.EmbeddedObjects)) Then
  1672.                Forall o In varBody.EmbeddedObjects
  1673.                     If ( o.Type = EMBED_ATTACHMENT ) Then
  1674.                          ' do some additional checking...    
  1675.                          strInFilePath = strPath + o.Source
  1676.                          
  1677.                          Call o.ExtractFile( strInFilePath )
  1678.                          
  1679.                          If ( (HasReservedExtension(strInFilePath) = False) And (DLPIsEncryptedFile(strInFilePath) <> 0) ) Then
  1680.                               lAttachments = lAttachments + 1
  1681.                               Redim Preserve astrAttach(lAttachments)
  1682.                               astrAttach(lAttachments) = o.Source
  1683.                          End If
  1684.                          Kill (strInFilePath)
  1685.                     End If
  1686.                End Forall
  1687.           End If
  1688.      End If
  1689.      
  1690.      
  1691.      If (lAttachments > 0) Then lHasAttachments = 1
  1692.      
  1693.      Dim lSerial As Long
  1694.      Dim lSlot As Long
  1695.      Dim lAttsSlot As Long
  1696.      Dim lDoAtts As Long
  1697.      
  1698.      lSlot = -1
  1699.      lAttsSlot = -1
  1700.      
  1701.      lResult = EncryptBufferEx(strBuffer, lSerial, lSlot, lHasAttachments, lDoAtts, lAttsSlot, 0) 
  1702.      
  1703.      If (lResult <> 0) Then Exit Sub
  1704.      
  1705.      If (lHasAttachments And lDoAtts) Then
  1706.           Dim strOutFilePath As String  
  1707.           
  1708.           Forall strAttach In astrAttach 
  1709.                Set obj = doc.GetAttachment(strAttach)
  1710.                If (Not (obj Is Nothing)) Then        
  1711.                     strInFilePath = strPath + obj.Source
  1712.                     strOutFilePath = strInFilePath & ".dlp"
  1713.                     
  1714.                     Call obj.ExtractFile( strInFilePath )
  1715.                     
  1716.                     If ( (HasReservedExtension(strInFilePath) = False) And (DLPIsEncryptedFile(strInFilePath) <> 0) ) Then     
  1717.                          lResult = DLPEncryptFile(0, strInFilePath, strOutFilePath, lAttsSlot, lSerial, 0)
  1718.                          
  1719.                          If (lResult = 0) Then
  1720.                               Call obj.Remove()
  1721.                               Call InsertAttachment(doc, strOutFilePath)
  1722.                               Kill strInFilePath
  1723.                               Kill strOutFilePath
  1724.                          End If
  1725.                     Else
  1726.                          Call obj.Remove()
  1727.                          Call InsertAttachment(doc, strInFilePath) 
  1728.                          Kill strInFilePath
  1729.                     End If
  1730.                End If
  1731.           End Forall
  1732.      End If
  1733.      
  1734.      Call doc.ReplaceItemValue("$ContentIcon", 62)
  1735.      Call doc.ReplaceItemValue("DlpEncrypted", FLAG_ENCRYPTNOW)
  1736.      ' varBody.Values(0) = strBuffer
  1737.      Call doc.ReplaceItemValue("Body", strBuffer)
  1738.      
  1739.      Call doc.Save(True, False) 
  1740.      
  1741.      Call doc.ReplaceItemValue("MailOptions", "0")
  1742.      Call doc.ReplaceItemValue("SaveOptions", "0")
  1743.      
  1744.      Call uidoc.Close()
  1745.      
  1746.      Call uiWs.EditDocument(True, doc, False)
  1747.      
  1748.      Exit Sub
  1749.      
  1750. ErrorTrap:
  1751.      Call ShowRuntimeError()
  1752.      Exit Sub
  1753. End Sub
  1754.  x x 
  1755.  h h 
  1756. !x!x!
  1757. X!h!<
  1758. !8"d#("T#
  1759. (!(!4
  1760. %p%p%
  1761. %`%`%
  1762. &$'$'
  1763. &|'4'
  1764. &\'t&t&
  1765. T#T#@
  1766. K  ,H
  1767. K  ,H
  1768. K  ,H
  1769. ^x Kh -4
  1770.  Kx -X
  1771.  ,(!}
  1772. ^X!^x!]
  1773. ^X!^x!]
  1774. !,X"}T
  1775. !,0 }
  1776. ^t#Jt#Jd#
  1777. $- %#
  1778. ^D%K\
  1779. ND%TT%~
  1780. ^p%K`%-4
  1781. %Kp%-X
  1782. &,X"}T
  1783. &,(!}T
  1784. &N &S
  1785. &N &P
  1786. ^t&Kd&-4
  1787. &Kt&-X
  1788. Kt&.$
  1789. &F$'P
  1790. ^4'r4'
  1791. o4'F$'P
  1792. '^|'^\'
  1793. Kt&,P
  1794. (DESlock+ Configuration)DESlockConfiguration
  1795. (DESlock+ Configuration)DESlockConfiguration>
  1796. (DESlock+ Configuration)DESlockConfiguration>
  1797. (DESlock+ Configuration)DESlockConfiguration>
  1798. CN=Mark Anstice/O=deskey
  1799. DlpEncryption
  1800. DESlock+ Configuration...
  1801. DESlock+
  1802. (DESlock+ Configuration)DESlockConfiguration
  1803. (DESlock+ Configuration)DESlockConfiguration>
  1804. (DESlock+ Configuration)DESlockConfiguration>
  1805. (DESlock+ Configuration)DESlockConfiguration>
  1806. CN=Mark Anstice/O=deskey
  1807. DlpEncryption
  1808. DESlock+ Configuration...
  1809. DESlock+
  1810. (DESlock+ Configuration)DESlockConfiguration
  1811. (DESlock+ Configuration)DESlockConfiguration>
  1812. (DESlock+ Configuration)DESlockConfiguration>
  1813. (DESlock+ Configuration)DESlockConfiguration>
  1814. CN=Mark Anstice/O=deskey
  1815. DlpEncryption
  1816. DESlock+ Configuration...
  1817. DESlock+
  1818. (DESlock+ Configuration)DESlockConfiguration
  1819. (DESlock+ Configuration)DESlockConfiguration>
  1820. (DESlock+ Configuration)DESlockConfiguration>
  1821. (DESlock+ Configuration)DESlockConfiguration>
  1822. CN=Mark Anstice/O=deskey
  1823. DlpEncryption
  1824. DESlock+ Configuration...
  1825. DESlock+
  1826. (DESlock+ Configuration)DESlockConfiguration
  1827. (DESlock+ Configuration)DESlockConfiguration>
  1828. (DESlock+ Configuration)DESlockConfiguration>
  1829. (DESlock+ Configuration)DESlockConfiguration>
  1830. CN=Mark Anstice/O=deskey
  1831. DlpEncryption
  1832. DESlock+ Configuration...
  1833. DESlock+
  1834.